<template>
    <section class="IntentionCard__container">
        <div class="title__panel">
            <el-tooltip effect="light" :content="title" placement="right-start">
                <span class="title__name"> {{ title }}</span>
            </el-tooltip>
        </div>

        <div class="repertory__panel">
            <span class="value">{{ quantity }}</span>
            <span class="key">{{ content }}</span>
        </div>
    </section>
</template>

<script>
export default {
    props: {
        quantity: {
            type: String,
            default: "0",
        },

        title: {
            type: String,
            default: "统计信息",
        },

        content: {
            type: String,
            default: "数量",
        },
    },
};
</script>

<style lang="scss" scoped>
.IntentionCard__container {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    box-shadow: 0 0 12px #ebebeb;
    border-radius: 5px;
    transition: 0.5s;
    padding: 10px;
    .title__panel {
        display: flex;
        flex-direction: column;
        border-bottom: 1px dashed #ebebeb;
        padding-bottom: 10px;

        .title__name {
            font-size: 1.8rem;
            font-weight: bold;
            position: relative;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            width: 280px;

            .name {
                margin-right: 2px;
                &:hover {
                    color: #409eff;
                    cursor: pointer;
                }
            }
        }
    }

    .repertory__panel {
        margin-top: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        .key {
            margin: 8px 0;
            color: #999;
        }

        .value {
            font-size: 4rem;
            color: coral;
        }
    }
}
</style>
